#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<unistd.h>

int un_g_val;
int g_val = 100;
int main()
{
    printf("text:          %p\n", main);
    printf("initialized:   %p\n", &g_val);
    printf("uninitialized: %p\n", &un_g_val);
    char* p1 = (char*)malloc(sizeof(int)*4);
    char* p2 = (char*)malloc(sizeof(int)*4);
    char* p3 = (char*)malloc(sizeof(int)*4);
    char* p4 = (char*)malloc(sizeof(int)*4);

    printf("heap:          %p\n", p1);
    printf("heap:          %p\n", p2);
    printf("heap:          %p\n", p3);
    printf("heap:          %p\n", p4);

    printf("stack:         %p\n", &p1);
    printf("stack:         %p\n", &p2);
    printf("stack:         %p\n", &p3);
    printf("stack:         %p\n", &p4);

}
